   3 .BANGMAN
   9 NT=2
  10 clear ;print "ONE PERSON KEYS IN A WORD TO 10 LETTERS
  15 print ;print "ANOTHER TRIES TO GUESS IT WITH NO MORE THAN
  20 print "9 WRONG GUESSES";print "USING KN & TR(1)
  30 print ;print "PRESS GO
  50 I=KP;if I=13clear 
 100 E=0;Q=0
 300 for A=0to 9
 310 CY=31
 320 print "LETTER #",#3,A+1
 330 box -55,23,50,8,2
 400 K=KP
 410 if K=13goto 790
 420 if K>90print "INVALID";goto 310
 430 if K<65print "INVALID";goto 310
 600 @(A)=K;@(A+10)=K
 700 next A
 790 clear 
 800 for B=0to A-1
 900 Y=-32;X=-80+(Bmul 8)+3
1010 box X,Y,7,3,1;next B
1100 CY=-24;CX=6;print "USED LETTERS";CY=-32;CX=42;print "BELOW:
1200 for M=0to 25;@(M+20)=M+65;next M
1300 for D=0to 25
1400 CY=31;CX=-80
1410 print "GUESS #",#3,D+1
1420 box -33,19,94,16,2
1430 G=(KN(1)+132)div 10+65
1440 CY=23;CX=-74;TV=G
1450 if TR(1)=0goto 1430
1540 if @(G-45)=-1print " HAS BEEN USED";goto 1400
1550 @(G-45)=-1;CY=-40;CX=-78+((G-65)mul 6);TV=G
1600 for C=0to A-1
1700 CY=-25
1800 if G=@(C)CX=-79+(Cmul 8)+3;TV=G;Q=1;@(C)=-1
1900 next C
2000 if Q#1gosub 9600+(Emul 10);E=E+1;if E=9goto 9000
2050 Q=0
2100 for F=0to A-1
2110 if @(F)#-1goto 2200
2120 next F
2130 CY=17;CX=-50
2140 print "CONGRATULATIONS!
2150 CY=0;CX=-80;print "PRESS GO";goto 50
2200 next D
9000 CX=-80;CY=-9
9010 print "SORRY! 
9020 print "THE WORD WAS
9030 for H=0to A-1
9035 CX=-79+((Hmul 8)+3)
9040 TV=@(H+10);next H
9060 box -16,0,10,10,1;box -8,7,27,5,1;box -19,11,1,2,1;box 4,11,1,2,1;box -9,4,1,4,1
9110 box -6,3,1,5,1;box -8,0,6,1,1;box -18,7,3,3,2;box -17,7,2,1,1;box -14,7,3,3,2
9160 box -14,7,1,1,1;box -11,7,1,3,2;box -9,6,2,1,2;box -7,8,3,1,2;box -7,7,1,2,2
9200 &(9)=222;&(0)=87;&(1)=87;&(2)=80;&(3)=80
9225 for U=0to 5
9230 &(23)=255;&(21)=255
9240 &(23)=0;&(21)=31
9260 for V=5to 20;&(19)=V;next V
9270 &(21)=0;&(19)=0
9300 X=rnd (10)+55
9310 Y=rnd (12)
9320 box X,Y,1,1,2
9340 next U
9350 FC=80;&(10)=0
9360 box 60,10,38,60,2
9370 box -8,4,30,18,2
9400 for Y=0to 176;&(10)=Y;next Y
9410 &(9)=50;FC=0
9500 CX=-50;CY=16;print "PRESS GO";goto 50
9600 box 60,27,10,14,1;box 58,28,2,1,2;box 62,28,2,1,2;box 60,24,6,1,2;return 
9610 box 60,18,4,5,1;return 
9620 box 60,6,16,20,1;return 
9630 box 50,14,4,3,1;box 49,6,3,20,1;return 
9640 box 70,14,4,3,1;box 70,6,3,20,1;return 
9650 box 57,-12,3,15,1;return 
9660 box 64,-12,3,15,1;return 
9670 box 55,-20,8,2,1;return 
9680 box 67,-20,8,2,1;return 
>:return 